<HTML><HEAD><TITLE>PersistentObject</TITLE></HEAD>
<BODY>
<!#CLASSDEF
PersistentObject
#ENDCLASSDEF>
<H1>PersistentObject</H1>

<P>Objects wishing to be persistent should usually derive from this class: it
implements the dopy_afterMethod() method to write the object after every method
invocation.  
<P>Alternatively, users may wish to implement this functionality themselves so
as to be more selective about when they write the object.  If you choose to
implement this yourself, you may also wish to implement the _dopy_setpath()
method to allow the pathname of the object to be communicated upon activation.  
<H2>Methods</H2>
<UL>
<LI><A HREF="#__init__(self)">__init__(self)</A>
<LI><A HREF="#_acquire(self)">_acquire(self)</A>
<LI><A HREF="#_release(self)">_release(self)</A>
<LI><A HREF="#dopy_afterMethod(self,_request,_response)">dopy_afterMethod(self, request, response)</A>
<LI><A HREF="#dopy_beforeMethod(self,_request)">dopy_beforeMethod(self, request)</A>
<LI><A HREF="#dopy_setPath(self,_pathname)">dopy_setPath(self, pathname)</A>
</UL>
<A NAME="__init__">
<A NAME="__init__(self)">
<H3>__init__(self)</H3>
<PRE>
   def __init__(self):
</PRE>

<A NAME="_acquire">
<A NAME="_acquire(self)">
<H3>_acquire(self)</H3>
<PRE>
   def _acquire(self):
</PRE>

<P>Manages the cache.  Derived classes should call this if they override
dopy_beforeMethod().  
<A NAME="_release">
<A NAME="_release(self)">
<H3>_release(self)</H3>
<PRE>
   def _release(self):
</PRE>

<P>Manages the cache.  Derived classes should call this if they override
dopy_afterMethod().  
<A NAME="dopy_afterMethod">
<A NAME="dopy_afterMethod(self,_request,_response)">
<H3>dopy_afterMethod(self, request, response)</H3>
<PRE>
   def dopy_afterMethod(self, request, response):
</PRE>

<P>Called by <A HREF="../../dopy/Hub.html#__processRequest">
dopy.Hub.__processRequest()</A> after a remote method invocation.  Writes
<I>self</I> to its file.  
<A NAME="dopy_beforeMethod">
<A NAME="dopy_beforeMethod(self,_request)">
<H3>dopy_beforeMethod(self, request)</H3>
<PRE>
   def dopy_beforeMethod(self, request):
</PRE>

<P>Called by <A HREF="../../dopy/Hub.html#__processRequest">
dopy.Hub.__processRequest()</A> before a remote method invocation.  Increments
the use count associated with <I>self</I> in the cache.  
<A NAME="dopy_setPath">
<A NAME="dopy_setPath(self,_pathname)">
<H3>dopy_setPath(self, pathname)</H3>
<PRE>
   def dopy_setPath(self, pathname):
</PRE>

<P>Called by <A HREF="FileSysDirectory.html"> FileSysDirectory</A> upon loading
the object.  Sets the path so that the object can be saved to the correct file
by dopy_afterMethod().  
</BODY></HTML>
